package io.renren.service;

import io.renren.common.service.CrudService;
import io.renren.dto.TradermDTO;
import io.renren.dto.UserInfoDto;
import io.renren.entity.TradermEntity;

import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Map;

/**
 * ${comments}
 *
 * @author Sen 524227263@qq.com
 * @since 1.0.0 2024-05-21
 */
public interface TradermService extends CrudService<TradermEntity, TradermDTO> {

    TradermEntity findOneByTel(String mobile);

    TradermEntity findOneByTraderMOID(String tradermFk);

    Map<String, Object> memberInfo(String traderMOID);

    TradermEntity updateUserInfo(String traderMOID, UserInfoDto dto);

    TradermEntity findByMiniOpenId(String miniprogramOpenId);

    TradermEntity findByWxOpenId(String openId);

    void updateWxOpenIdByMiniOpenId(String openId, String openId1);

    List<TradermEntity> findListByTel(@NotBlank(message = "手机号不能为空") String mobile);

    void setWxOpenIdIsNull(String tradermoid);
}